package com.cw.DesignModel23.Behavioral.ChainofResponsibilityPattern.Chain2;

//【具体解决问题的类：只要问题的编号是奇数，就可以解决】
public class OddSupport extends Support {
    /**
     * 构造函数
     * @param name
     */
    public OddSupport(String name) {
        super(name);
    }
    protected boolean resolve(Trouble trouble) {
        if (trouble.getNumber() % 2 == 1) {
            return true;
        } else {
            return false;
        }
    }
}

